﻿using core6_website.Models;
using Microsoft.AspNetCore.Mvc;

namespace z2.Controllers
{
    public class StudentController : Controller
    {
        private readonly IStudentRepo _studentRepo;

        public StudentController(IStudentRepo studentRepo)
        {
            _studentRepo = studentRepo;
        }

        public JsonResult Index()
        {
            Student model =  _studentRepo.GetStudent(1);
            return Json(model); 
        }
    }
}
